import request from '@/utils/request'

// 获取月卡列表
export function getCardList (params) {
  return request({
    url: '/parking/card/list',
    method: 'GET',
    params
  })
}

// 添加月卡
export function addMonthCard (data) {
  return request({
    url: '/parking/card',
    method: 'POST',
    data
  })
}

// 月卡详情
export function cardDetail (id) {
  return request({
    url: `/parking/card/detail/${id}`
  })
}

// 编辑月卡
export function editCard (data) {
  return request({
    url: '/parking/card/edit',
    method: 'PUT',
    data
  })
}

// 删除月卡
export function deleteCard (id) {
  return request({
    url: `/parking/card/${id}`,
    method: 'DELETE'
  })
}
